package com.javaclimb.music.controller;

import com.javaclimb.music.po.Song;
import com.javaclimb.music.service.SongService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class SongController {
    @Autowired
    private SongService service;

@RequestMapping(value = "/getSongNum",method = RequestMethod.POST)
    public int getSongNum() {
        return service.getSongNum();
    }

    @RequestMapping(value = "/getSongList",method = RequestMethod.POST)
    public List<Song> getSongList(){
        return service.getSongList();
    }

}


